<?php 
echo $javascript->link(array('prototype','jquery-1.5.min.js','jquery.asmselect.js','jquery.toChecklist.min.js'), false);
//echo $javascript->link(array('prototype'), false);
echo $this->Html->css(array('jquery.asmselect','jquery.toChecklist.min'));
?>
<!--
<script language="javascript">
                $(document).ready(function() {
//			$('#MeetStaffId').asmSelect({
//				addItemTarget: 'top',
//				animate: true,
//				highlight: true,
//				sortable: true
//			});	
                        $('#MeetStaffId').toChecklist({
				showCheckboxes : true,
	                        addScrollBar : false
			});
		}); 
</script>-->

<div class="meets form">
<?php echo $this->Form->create('Meet');?>
    <fieldset>
        <legend><?php __('Add Meet'); ?></legend>
        <?php
         echo $this->Form->input('department_id',array('label'=>'Phòng ban:'));
         echo $this->Form->input('staff_id',array('label'=>'Danh sách nhân viên tham dự cuộc họp:','multiple'=>'multiple'));//,'multiple' => '','type' => 'select','selected' => $html->value('Staff.Staff')));
         $options = array('url' => 'getStaffs', 'update' => 'MeetStaffId');
         echo $ajax->observeField('MeetDepartmentId', $options);         
        ?>        
    </fieldset>
    <?php echo $this->Form->end(__('Add', true));?>
</div>
<!--<div class="related">
    <?php echo $this->Form->create('Meet');?>
    <fieldset>
		<legend><?php __('Related Meet'); ?></legend>
                <table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Username'); ?></th>
		<th><?php __('Staff Name'); ?></th>
		<th><?php __('Address'); ?></th>
		<th><?php __('Email'); ?></th>
		<th><?php __('Tel'); ?></th>
		<th><?php __('Sex'); ?></th>
		<th><?php __('Department Id'); ?></th>
		<th><?php __('Position Id'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($meet['Staff'] as $staff):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $staff['id'];?></td>
			<td><?php echo $staff['username'];?></td>
			<td><?php echo $staff['staff_name'];?></td>
			<td><?php echo $staff['address'];?></td>
			<td><?php echo $staff['email'];?></td>
			<td><?php echo $staff['tel'];?></td>
			<td><?php echo $staff['sex'];?></td>
			<td><?php echo $staff['department_id'];?></td>
			<td><?php echo $staff['position_id'];?></td>	
		</tr>
	<?php endforeach; ?>
	</table>
    </fieldset>
</div>-->